
import delimited "path\Twitter Replication.csv", bindquote(strict) clear 

rdrobust anger floydtimes if blackrep==1, c(2) p(1)
rdrobust anger floydtimes if whiterep==1, c(2) p(1)
rdrobust anger floydtimes if latinorep==1, c(2) p(1)

rdrobust sad floydtimes if blackrep==1, c(2) p(1)
rdrobust sad floydtimes if whiterep==1, c(2) p(1)
rdrobust sad floydtimes if latinorep==1, c(2) p(1)

rdrobust anx floydtimes if blackrep==1, c(2) p(1)
rdrobust anx floydtimes if whiterep==1, c(2) p(1)
rdrobust anx floydtimes if latinorep==1, c(2) p(1)

clear

import delimited "Path\Facebook Replication.csv", bindquote(strict) clear 

rdrobust anger floydtimes if black==1, c(2) p(1)
rdrobust anger floydtimes if white==1, c(2) p(1)
rdrobust anger floydtimes if latino==1, c(2) p(1)

rdrobust sad floydtimes if black==1, c(2) p(1)
rdrobust sad floydtimes if white==1, c(2) p(1)
rdrobust sad floydtimes if latino==1, c(2) p(1)

rdrobust anx floydtimes if black==1, c(2) p(1)
rdrobust anx floydtimes if white==1, c(2) p(1)
rdrobust anx floydtimes if latino==1, c(2) p(1)

clear


import delimited "Path\Press Release Replication.csv", bindquote(strict) clear 

rdrobust anger floydtimes if black==1, c(2) p(1)
rdrobust anger floydtimes if white==1, c(2) p(1)
rdrobust anger floydtimes if latino==1, c(2) p(1)

rdrobust sad floydtimes if black==1, c(2) p(1)
rdrobust sad floydtimes if white==1, c(2) p(1)
rdrobust sad floydtimes if latino==1, c(2) p(1)

rdrobust anx floydtimes if black==1, c(2) p(1)
rdrobust anx floydtimes if white==1, c(2) p(1)
rdrobust anx floydtimes if latino==1, c(2) p(1)


clear


import delimited "Path\Experiment Replication.csv", bindquote(strict) clear 
***Test for Approval of House Rep. Angrydiff refers to change in anger after seeing photos. Treatment 1=Baseline, 2=Angry Tweet, 3=Sadness Tweet****
***Among Those Who Increased in Anger***
ttest approvehouserep if angrydiff>0 & treatment~=3, by(treatment)
ttest approvehouserep if angrydiff>0 & treatment~=1, by(treatment)

***Among Those Who Did Not Increase in Anger***
ttest approvehouserep if angrydiff<=0 & treatment~=3, by(treatment)
ttest approvehouserep if angrydiff<=0 & treatment~=1, by(treatment)

***Test for Empathy of House Rep.
***Among Those Who Increased in Anger***
ttest careshouserep if angrydiff>0 & treatment~=3, by(treatment)
ttest careshouserep if angrydiff>0 & treatment~=1, by(treatment)

***Among Those Who Did Not Increase in Anger***
ttest careshouserep if angrydiff<=0 & treatment~=3, by(treatment)
ttest careshouserep if angrydiff<=0 & treatment~=1, by(treatment)

***Test for Trust of House Rep. 
***Among Those Who Increased in Anger***
ttest trusthouserep if angrydiff>0 & treatment~=3, by(treatment)
ttest trusthouserep if angrydiff>0 & treatment~=1, by(treatment)

***Among Those Who Did Not Increase in Anger***
ttest careshouserep if angrydiff<=0 & treatment~=3, by(treatment)
ttest careshouserep if angrydiff<=0 & treatment~=1, by(treatment)
